@extends('admin.layout.common')
@section('content')
    <link rel="stylesheet" type="text/css" href="{{URL::asset('css/user/AgentInformationViewing.css')}}">
    <style>
        header ul li:last-child img {
            width: 30px;
            transform: translateY(0%);
        }
        .box .left .right .content h1 {
            width: 200px;
        }
    </style>
    <div class="content">
        <div class="mon">
            <div class="mon_left">
                <p>
                    <i class="iconfont icon gongzuo">&#xe647;</i>
                    <span>{{date('Y年m月d日')}}  本月已开户{{ session('monthPass') }}个  打回{{session('monthRefuse')}}个</span>
                <p>超过了{{ session('monthPrecent') }}的三咖审核员，继续努力！从此踏上人生巅峰，迎娶白富美！</p>
                </p>
            </div>
            <div class="mon_right">
                <p>您今天已经开户{{session('todayPass')}}个    打回{{session('todayRefuse')}}个</p>
                <p>超过了{{session('todayPrecent')}}的三咖开户员哦~棒棒哒！！！</p>
            </div>
        </div>
        <p class="tongzhi"><i class="iconfont icon laba">&#xe914;</i>{{getArticleByDepartmentId()}}</p>
        <!-- 公共结束 -->
        <form class="message_box" method="post">
            {{csrf_field()}}
            <h1 class="h1">代理信息修改</h1>
            <div class="message_big">
                <div class="message_left">
                    <div class="quancheng amend">
                            <p><label>全称：</label>
                                <input type="text" name="full_name" value="{{$v['full_name']}}"></p>
                            <p><label>简称：</label>
                                <input type="text" name="simple_name" value="{{$v['simple_name']}}" ></p>
                            <p><label>分比：</label>
                                <select name="scale" style="width: 282px;height:40px;margin:10px 0 10px 10px;border-bottom:1px solid #ccc;">
                                    <option value="1" @if($v['scale']==1) selected @endif>代理4</option>
                                    <option value="2" @if($v['scale']==2) selected @endif>代理5</option>
                                    <option value="3" @if($v['scale']==3) selected @endif>代理6</option>
                                    <option value="4" @if($v['scale']==4) selected @endif>代理7</option>
                                </select></p>
                            <p><label>联系人：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                                <input type="text" name="phone_name" value="{{$v['phone_name']}}" class="border1"></p>
                            <p><label>固定电话：</label>
                                <input value="{{$v['telephone']}}" type="text" name="telephone" class="border1"></p>
                            <p><label>移动电话：</label>
                                <input value="{{$v['phone']}}" type="text" name="phone" class="border1"></p>
                            <p><label>微信：</label>
                                <input value="{{$v['weixin']}}" type="text" name="weixin" class="border1"></p>
                            <p><label>微博：</label>
                                <input value="{{$v['weibo']}}" type="text" name="weibo" class="border1"></p>
                            <p><label>email:</label>
                                <input value="{{$v['email']}}" type="text" name="email" class="border1"></p>
                            <p><label>网址：</label>
                                <input value="{{$v['url']}}" type="text" name="url"></p>
                    </div>
                    <div class="zhuying">
                        <p style="font-weight: 700;"><label>纪念日：</label></p>
                            <div class="informationBox">
                                @foreach($v['memory_day'] as $k => $vv)
                                    <div class="detailBox{{$k + 1}}">
                                        <label for=""><input type="date" name="memory_day{{$k + 1}}" value="{{$vv['day']}}" style="width: 160px;height:40px"></label>
                                        <i class="icon iconfont rili">&#xe614;</i>
                                        <select name="memory_des{{$k + 1}}" id="">
                                            @switch($vv['des'])
                                            @case('生日')
                                            <option value="">纪念日性质</option>
                                            <option value="生日" selected>生日</option>
                                            <option value="开业">开业</option>
                                            <option value="主管生日">主管生日</option>
                                            @break
                                            <i class="icon iconfont rili jiahao">&#xe726;</i>
                                            @case('开业')
                                            <option value="">纪念日性质</option>
                                            <option value="生日">生日</option>
                                            <option value="开业" selected>开业</option>
                                            <option value="主管生日">主管生日</option>
                                            @break
                                            <i class="icon iconfont rili jiahao">&#xe726;</i>
                                            @case('主管生日')
                                            <option value="">纪念日性质</option>
                                            <option value="生日">生日</option>
                                            <option value="开业">开业</option>
                                            <option value="主管生日" selected>主管生日</option>
                                            @break
                                            @endswitch
                                        </select>
                                        {{--<i class="icon iconfont jiahao_{{$k +1}} addImg">&#xe600;</i>--}}
                                    </div>
                                @endforeach
                            </div>
                            <table id="table1"></table>
                            <p><label>合作简述：</label>
                                <input value="{{$v['protocol']}}" type="text" name="protocol">
                            </p>
                            <p><label>收款人姓名：</label>
                                <input value="{{$v['payee_name']}}" type="text" name="payee_name" class="border1"></p>
                            <p><label>银行卡卡号:</label>
                                <input value="{{$v['band_card']}}" type="text" name="band_card" class="border1"></p>
                            <p><label>开户行信息：</label>
                                <input value="{{$v['band_info']}}" type="text" name="band_info"></p>
                    </div>
                </div>
                <div class="message_right">
                        <p><label>备注：<span></span></label>
                        <p><textarea  name="remark" style="width:80%;text-indent:2em;border:none;">{{$v['remark']}}</textarea></p>
                </div>
            </div>
            <input type="hidden" name="id" value="{{ $id }}"/>
            <p><button type="submit" value="保存" class="sunmit_click" style="height:40px">保存</button></p>
        </form>
        </div>
    </div>
    <script>
        $(function(){
            //点击+增加三个
            $('.jiahao_1').click(function(){
                $('.detailBox2').show();
            }) ;
            $('.jiahao_2').click(function(){
                $('.detailBox3').show();
            });
            //高级设置
            $(".advanced").click(function(){
                $(".form").slideToggle(1000);
            });
            //点击添加备注
            $(".add_remark").on('click',function(){
                layer.prompt({title: '添加备注', formType: 1}, function(pass, index){
                    layer.close(index);
                });
            });
        });
    </script>
    @endsection

